%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/relay/computed-id"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 11, 12, 28, 229, 230, 231, 232, 233, 234, 235, 236, 7, 8, 13, 18, 19, 29, 30, 56, 57, 81, 82, 106, 107, 131, 132, 155, 156, 180, 181, 205, 206<br />2: 32, 59, 84, 109, 134, 158, 183, 208<br />3: 35, 62, 87, 112, 137, 161, 186, 211<br />ᐳ: 34, 36, 37, 40, 53, 61, 63, 64, 66, 78, 86, 88, 89, 91, 103, 111, 113, 114, 116, 128, 136, 138, 139, 141, 153, 160, 162, 163, 165, 177, 185, 187, 188, 190, 202, 210, 212, 213, 215, 227<br />4: PgSelect[10], PgSelect[21]<br />5: PgSelectRows[15], PgSelectRows[24]<br />ᐳ: 14, 16, 23, 25"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 16<br /><br />ROOT PgSelectSingleᐸusersᐳ[16]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 25<br /><br />ROOT PgSelectSingleᐸusersᐳ[25]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2

    %% plan dependencies
    PgSelect10[["PgSelect[10∈0] ➊<br />ᐸusersᐳ"]]:::plan
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ7.1ᐳ"}}:::plan
    PgFromExpression40{{"PgFromExpression[40∈0] ➊"}}:::plan
    PgFromExpression66{{"PgFromExpression[66∈0] ➊"}}:::plan
    PgFromExpression91{{"PgFromExpression[91∈0] ➊"}}:::plan
    PgFromExpression116{{"PgFromExpression[116∈0] ➊"}}:::plan
    PgFromExpression141{{"PgFromExpression[141∈0] ➊"}}:::plan
    PgFromExpression165{{"PgFromExpression[165∈0] ➊"}}:::plan
    PgFromExpression190{{"PgFromExpression[190∈0] ➊"}}:::plan
    PgFromExpression215{{"PgFromExpression[215∈0] ➊"}}:::plan
    Access8 -->|rejectNull| PgSelect10
    Object13 & PgFromExpression40 & PgFromExpression66 & PgFromExpression91 & PgFromExpression116 & PgFromExpression141 & PgFromExpression165 & PgFromExpression190 & PgFromExpression215 --> PgSelect10
    PgSelect21[["PgSelect[21∈0] ➊<br />ᐸusersᐳ"]]:::plan
    Access19{{"Access[19∈0] ➊<br />ᐸ18.1ᐳ"}}:::plan
    PgFromExpression53{{"PgFromExpression[53∈0] ➊"}}:::plan
    PgFromExpression78{{"PgFromExpression[78∈0] ➊"}}:::plan
    PgFromExpression103{{"PgFromExpression[103∈0] ➊"}}:::plan
    PgFromExpression128{{"PgFromExpression[128∈0] ➊"}}:::plan
    PgFromExpression153{{"PgFromExpression[153∈0] ➊"}}:::plan
    PgFromExpression177{{"PgFromExpression[177∈0] ➊"}}:::plan
    PgFromExpression202{{"PgFromExpression[202∈0] ➊"}}:::plan
    PgFromExpression227{{"PgFromExpression[227∈0] ➊"}}:::plan
    Access19 -->|rejectNull| PgSelect21
    Object13 & PgFromExpression53 & PgFromExpression78 & PgFromExpression103 & PgFromExpression128 & PgFromExpression153 & PgFromExpression177 & PgFromExpression202 & PgFromExpression227 --> PgSelect21
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access11 & Access12 --> Object13
    PgSelect32[["PgSelect[32∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access30{{"Access[30∈0] ➊<br />ᐸ29.1ᐳ"}}:::plan
    Access30 -->|rejectNull| PgSelect32
    Object13 --> PgSelect32
    PgSelect59[["PgSelect[59∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access57{{"Access[57∈0] ➊<br />ᐸ56.1ᐳ"}}:::plan
    Access57 -->|rejectNull| PgSelect59
    Object13 --> PgSelect59
    PgSelect84[["PgSelect[84∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access82{{"Access[82∈0] ➊<br />ᐸ81.1ᐳ"}}:::plan
    Access82 -->|rejectNull| PgSelect84
    Object13 --> PgSelect84
    PgSelect109[["PgSelect[109∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access107{{"Access[107∈0] ➊<br />ᐸ106.1ᐳ"}}:::plan
    Access107 -->|rejectNull| PgSelect109
    Object13 --> PgSelect109
    PgSelect134[["PgSelect[134∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access132{{"Access[132∈0] ➊<br />ᐸ131.1ᐳ"}}:::plan
    Access132 -->|rejectNull| PgSelect134
    Object13 --> PgSelect134
    PgSelect158[["PgSelect[158∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access156{{"Access[156∈0] ➊<br />ᐸ155.1ᐳ"}}:::plan
    Access156 -->|rejectNull| PgSelect158
    Object13 --> PgSelect158
    PgSelect183[["PgSelect[183∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access181{{"Access[181∈0] ➊<br />ᐸ180.1ᐳ"}}:::plan
    Access181 -->|rejectNull| PgSelect183
    Object13 --> PgSelect183
    PgSelect208[["PgSelect[208∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access206{{"Access[206∈0] ➊<br />ᐸ205.1ᐳ"}}:::plan
    Access206 -->|rejectNull| PgSelect208
    Object13 --> PgSelect208
    Lambda7{{"Lambda[7∈0] ➊<br />ᐸspecifier_User_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJ1c2VycyIsMV0='ᐳ[229]"}}:::plan
    Lambda7 --> Access8
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access11
    __Value2 --> Access12
    First14{{"First[14∈0] ➊"}}:::plan
    PgSelectRows15[["PgSelectRows[15∈0] ➊"]]:::plan
    PgSelectRows15 --> First14
    PgSelect10 --> PgSelectRows15
    PgSelectSingle16{{"PgSelectSingle[16∈0] ➊<br />ᐸusersᐳ"}}:::plan
    First14 --> PgSelectSingle16
    Lambda18{{"Lambda[18∈0] ➊<br />ᐸspecifier_User_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJ1c2VycyIsMl0='ᐳ[230]"}}:::plan
    Lambda18 --> Access19
    First23{{"First[23∈0] ➊"}}:::plan
    PgSelectRows24[["PgSelectRows[24∈0] ➊"]]:::plan
    PgSelectRows24 --> First23
    PgSelect21 --> PgSelectRows24
    PgSelectSingle25{{"PgSelectSingle[25∈0] ➊<br />ᐸusersᐳ"}}:::plan
    First23 --> PgSelectSingle25
    Lambda29{{"Lambda[29∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸundefinedᐳ[28]"}}:::plan
    Lambda29 --> Access30
    First34{{"First[34∈0] ➊"}}:::plan
    PgSelectRows35[["PgSelectRows[35∈0] ➊"]]:::plan
    PgSelectRows35 --> First34
    PgSelect32 --> PgSelectRows35
    PgSelectSingle36{{"PgSelectSingle[36∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First34 --> PgSelectSingle36
    PgClassExpression37{{"PgClassExpression[37∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle36 --> PgClassExpression37
    PgClassExpression37 -->|trapInhibited| PgFromExpression40
    PgClassExpression37 -->|trapInhibited| PgFromExpression53
    Lambda56{{"Lambda[56∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJzcGVjdGFjbGVzIiwxXQ=='ᐳ[231]"}}:::plan
    Lambda56 --> Access57
    First61{{"First[61∈0] ➊"}}:::plan
    PgSelectRows62[["PgSelectRows[62∈0] ➊"]]:::plan
    PgSelectRows62 --> First61
    PgSelect59 --> PgSelectRows62
    PgSelectSingle63{{"PgSelectSingle[63∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First61 --> PgSelectSingle63
    PgClassExpression64{{"PgClassExpression[64∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle63 --> PgClassExpression64
    PgClassExpression64 -->|trapInhibited| PgFromExpression66
    PgClassExpression64 -->|trapInhibited| PgFromExpression78
    Lambda81{{"Lambda[81∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJzcGVjdGFjbGVzIiwyXQ=='ᐳ[232]"}}:::plan
    Lambda81 --> Access82
    First86{{"First[86∈0] ➊"}}:::plan
    PgSelectRows87[["PgSelectRows[87∈0] ➊"]]:::plan
    PgSelectRows87 --> First86
    PgSelect84 --> PgSelectRows87
    PgSelectSingle88{{"PgSelectSingle[88∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First86 --> PgSelectSingle88
    PgClassExpression89{{"PgClassExpression[89∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle88 --> PgClassExpression89
    PgClassExpression89 -->|trapInhibited| PgFromExpression91
    PgClassExpression89 -->|trapInhibited| PgFromExpression103
    Lambda106{{"Lambda[106∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJzcGVjdGFjbGVzIiwzXQ=='ᐳ[233]"}}:::plan
    Lambda106 --> Access107
    First111{{"First[111∈0] ➊"}}:::plan
    PgSelectRows112[["PgSelectRows[112∈0] ➊"]]:::plan
    PgSelectRows112 --> First111
    PgSelect109 --> PgSelectRows112
    PgSelectSingle113{{"PgSelectSingle[113∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First111 --> PgSelectSingle113
    PgClassExpression114{{"PgClassExpression[114∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle113 --> PgClassExpression114
    PgClassExpression114 -->|trapInhibited| PgFromExpression116
    PgClassExpression114 -->|trapInhibited| PgFromExpression128
    Lambda131{{"Lambda[131∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJzcGVjdGFjbGVzIiw0XQ=='ᐳ[234]"}}:::plan
    Lambda131 --> Access132
    First136{{"First[136∈0] ➊"}}:::plan
    PgSelectRows137[["PgSelectRows[137∈0] ➊"]]:::plan
    PgSelectRows137 --> First136
    PgSelect134 --> PgSelectRows137
    PgSelectSingle138{{"PgSelectSingle[138∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First136 --> PgSelectSingle138
    PgClassExpression139{{"PgClassExpression[139∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle138 --> PgClassExpression139
    PgClassExpression139 -->|trapInhibited| PgFromExpression141
    PgClassExpression139 -->|trapInhibited| PgFromExpression153
    Lambda155{{"Lambda[155∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'WyJ1c2VycyIsMV0='ᐳ[229]"}}:::plan
    Lambda155 --> Access156
    First160{{"First[160∈0] ➊"}}:::plan
    PgSelectRows161[["PgSelectRows[161∈0] ➊"]]:::plan
    PgSelectRows161 --> First160
    PgSelect158 --> PgSelectRows161
    PgSelectSingle162{{"PgSelectSingle[162∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First160 --> PgSelectSingle162
    PgClassExpression163{{"PgClassExpression[163∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle162 --> PgClassExpression163
    PgClassExpression163 -->|trapInhibited| PgFromExpression165
    PgClassExpression163 -->|trapInhibited| PgFromExpression177
    Lambda180{{"Lambda[180∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'query'ᐳ[235]"}}:::plan
    Lambda180 --> Access181
    First185{{"First[185∈0] ➊"}}:::plan
    PgSelectRows186[["PgSelectRows[186∈0] ➊"]]:::plan
    PgSelectRows186 --> First185
    PgSelect183 --> PgSelectRows186
    PgSelectSingle187{{"PgSelectSingle[187∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First185 --> PgSelectSingle187
    PgClassExpression188{{"PgClassExpression[188∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle187 --> PgClassExpression188
    PgClassExpression188 -->|trapInhibited| PgFromExpression190
    PgClassExpression188 -->|trapInhibited| PgFromExpression202
    Lambda205{{"Lambda[205∈0] ➊<br />ᐸspecifier_Spectacle_base64JSONᐳ<br />More deps:<br />- Constantᐸ'invalidnodeid'ᐳ[236]"}}:::plan
    Lambda205 --> Access206
    First210{{"First[210∈0] ➊"}}:::plan
    PgSelectRows211[["PgSelectRows[211∈0] ➊"]]:::plan
    PgSelectRows211 --> First210
    PgSelect208 --> PgSelectRows211
    PgSelectSingle212{{"PgSelectSingle[212∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First210 --> PgSelectSingle212
    PgClassExpression213{{"PgClassExpression[213∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle212 --> PgClassExpression213
    PgClassExpression213 -->|trapInhibited| PgFromExpression215
    PgClassExpression213 -->|trapInhibited| PgFromExpression227
    PgClassExpression26{{"PgClassExpression[26∈1] ➊<br />ᐸ__users__.”username”ᐳ"}}:::plan
    PgSelectSingle16 --> PgClassExpression26
    PgClassExpression41{{"PgClassExpression[41∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression26 o--o PgClassExpression41
    PgClassExpression67{{"PgClassExpression[67∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression41 o--o PgClassExpression67
    PgClassExpression92{{"PgClassExpression[92∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression67 o--o PgClassExpression92
    PgClassExpression117{{"PgClassExpression[117∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression92 o--o PgClassExpression117
    PgClassExpression142{{"PgClassExpression[142∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression117 o--o PgClassExpression142
    PgClassExpression166{{"PgClassExpression[166∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression142 o--o PgClassExpression166
    PgClassExpression191{{"PgClassExpression[191∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression166 o--o PgClassExpression191
    PgClassExpression216{{"PgClassExpression[216∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression191 o--o PgClassExpression216
    PgClassExpression27{{"PgClassExpression[27∈2] ➊<br />ᐸ__users__.”username”ᐳ"}}:::plan
    PgSelectSingle25 --> PgClassExpression27
    PgClassExpression54{{"PgClassExpression[54∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression27 o--o PgClassExpression54
    PgClassExpression79{{"PgClassExpression[79∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression54 o--o PgClassExpression79
    PgClassExpression104{{"PgClassExpression[104∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression79 o--o PgClassExpression104
    PgClassExpression129{{"PgClassExpression[129∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression104 o--o PgClassExpression129
    PgClassExpression154{{"PgClassExpression[154∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression129 o--o PgClassExpression154
    PgClassExpression178{{"PgClassExpression[178∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression154 o--o PgClassExpression178
    PgClassExpression203{{"PgClassExpression[203∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression178 o--o PgClassExpression203
    PgClassExpression228{{"PgClassExpression[228∈2] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression203 o--o PgClassExpression228

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,Lambda7,Access8,PgSelect10,Access11,Access12,Object13,First14,PgSelectRows15,PgSelectSingle16,Lambda18,Access19,PgSelect21,First23,PgSelectRows24,PgSelectSingle25,Lambda29,Access30,PgSelect32,First34,PgSelectRows35,PgSelectSingle36,PgClassExpression37,PgFromExpression40,PgFromExpression53,Lambda56,Access57,PgSelect59,First61,PgSelectRows62,PgSelectSingle63,PgClassExpression64,PgFromExpression66,PgFromExpression78,Lambda81,Access82,PgSelect84,First86,PgSelectRows87,PgSelectSingle88,PgClassExpression89,PgFromExpression91,PgFromExpression103,Lambda106,Access107,PgSelect109,First111,PgSelectRows112,PgSelectSingle113,PgClassExpression114,PgFromExpression116,PgFromExpression128,Lambda131,Access132,PgSelect134,First136,PgSelectRows137,PgSelectSingle138,PgClassExpression139,PgFromExpression141,PgFromExpression153,Lambda155,Access156,PgSelect158,First160,PgSelectRows161,PgSelectSingle162,PgClassExpression163,PgFromExpression165,PgFromExpression177,Lambda180,Access181,PgSelect183,First185,PgSelectRows186,PgSelectSingle187,PgClassExpression188,PgFromExpression190,PgFromExpression202,Lambda205,Access206,PgSelect208,First210,PgSelectRows211,PgSelectSingle212,PgClassExpression213,PgFromExpression215,PgFromExpression227 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgClassExpression26,PgClassExpression41,PgClassExpression67,PgClassExpression92,PgClassExpression117,PgClassExpression142,PgClassExpression166,PgClassExpression191,PgClassExpression216 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgClassExpression27,PgClassExpression54,PgClassExpression79,PgClassExpression104,PgClassExpression129,PgClassExpression154,PgClassExpression178,PgClassExpression203,PgClassExpression228 bucket2

